package com.foreknow.oop3;

/**
 * 同一类中方法调用不用创建对象，直接写:方法名()
 */
public class Demo {
  public double getOrderTotal() {

    return total();
  }

  public double total() {
    return 2000;
  }

  public static void main(String[] args) {
    Demo d = new Demo();
    double dd = d.getOrderTotal();
    System.out.println(dd);
  }
}
